home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 November
/
EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso
/
earcd
/
dtype
/
multipri.lha
/
MultiPrint
/
Source
/
Init.c
next >
Wrap
C/C++ Source or Header
|
1995-08-08
|
1KB
|
58 lines
/*
** $PROJECT: MultiPrint - print datatype objects
**
** $VER: Init.c 39.0 (07.08.95)
**
** by
**
** Stefan Ruppert , Windthorststrasse 5 , 65439 Floersheim , GERMANY
**
** (C) Copyright 1995
** All Rights Reserved !
**
** $HISTORY:
**
** 07.08.95 : 039.000 : initial
*/
/* ------------------------------- includes ------------------------------- */
#include "MultiPrint.h"
/* ------------------------------ definition ------------------------------ */
#define PUDDLE_SIZE 4096
#define THRESH_SIZE 4096
/* ---------------------------- init function ----------------------------- */
void Free(struct GlobalData *gd)
{
DeletePool(gd->gd_Pool);
}
#undef SysBase
struct GlobalData *Init(void)
{
struct Library *SysBase = *((struct Library **) 4L);
struct GlobalData *gd = NULL;
APTR pool;
if(SysBase->lib_Version >= 39)
{
if((pool = CreatePool(MEMF_ANY | MEMF_CLEAR,PUDDLE_SIZE,THRESH_SIZE)) != NULL)
{
if((gd = AllocPooled(pool,sizeof(struct GlobalData))) != NULL)
{
gd->gd_SysBase = SysBase;
gd->gd_Pool = pool;
} else
DeletePool(pool);
}
}
return(gd);
}